package com.wandian.news.adapter;

import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.wandian.news.R;
import com.wandian.news.bean.LifeFoodBean;


/**
 * @author Administrator
 * @date 2019/12/16-13:32
 * @description 适配器
 **/
public class LifeFoodRecycleAdapter extends BaseQuickAdapter<LifeFoodBean.NewslistEntity, BaseViewHolder> {

    public LifeFoodRecycleAdapter(int layoutResId) {
        super(layoutResId);
    }

    @Override
    protected void convert(BaseViewHolder helper, LifeFoodBean.NewslistEntity item) {
        TextView tv_food_name = helper.getView(R.id.tv_food_name);
        tv_food_name.setText(item.getName()+"");
        TextView tv_food_rl = helper.getView(R.id.tv_food_rl);
        tv_food_rl.setText("热量(大卡)："+item.getRl());
        TextView tv_food_las = helper.getView(R.id.tv_food_las);
        tv_food_las.setText("硫胺素："+item.getLas());
        TextView tv_food_g = helper.getView(R.id.tv_food_g);
        tv_food_g.setText("钙(毫克)："+item.getGai());
        TextView tv_food_dbz = helper.getView(R.id.tv_food_dbz);
        tv_food_dbz.setText("蛋白质："+item.getDbz());
        TextView tv_food_hhs = helper.getView(R.id.tv_food_hhs);
        tv_food_hhs.setText("核黄素："+item.getSu());
        TextView tv_food_m = helper.getView(R.id.tv_food_m);
        tv_food_m.setText("镁："+item.getMei());
        TextView tv_food_zf = helper.getView(R.id.tv_food_zf);
        tv_food_zf.setText("脂肪："+item.getZf());
        TextView tv_food_ys = helper.getView(R.id.tv_food_ys);
        tv_food_ys.setText("烟酸："+item.getYs());
        TextView tv_food_t = helper.getView(R.id.tv_food_t);
        tv_food_t.setText("铁："+item.getTei());
        TextView tv_food_tshhw = helper.getView(R.id.tv_food_tshhw);
        tv_food_tshhw.setText("碳水化合物："+item.getShhf());
        TextView tv_food_wssc = helper.getView(R.id.tv_food_wssc);
        tv_food_wssc.setText("维生素C："+item.getWsfc());
        TextView tv_food_wssa = helper.getView(R.id.tv_food_wssa);
        tv_food_wssa.setText("维生素A："+item.getWssa());
        TextView tv_food_meng = helper.getView(R.id.tv_food_meng);
        tv_food_meng.setText("锰："+item.getMeng());
        TextView tv_food_ssqw = helper.getView(R.id.tv_food_ssqw);
        tv_food_ssqw.setText("膳食纤维："+item.getSsxw());
        TextView tv_food_wsse = helper.getView(R.id.tv_food_wsse);
        tv_food_wsse.setText("维生素E："+item.getWsse());
        TextView tv_food_xin = helper.getView(R.id.tv_food_xin);
        tv_food_xin.setText("锌："+item.getXin());
        TextView tv_food_xi = helper.getView(R.id.tv_food_xi);
        tv_food_xi.setText("硒："+item.getXi());
        TextView tv_food_dgc = helper.getView(R.id.tv_food_dgc);
        tv_food_dgc.setText("胆固醇："+item.getDgc());
        TextView tv_food_tong = helper.getView(R.id.tv_food_tong);
        tv_food_tong.setText("铜："+item.getTong());
        TextView tv_food_hlbs = helper.getView(R.id.tv_food_hlbs);
        tv_food_hlbs.setText("胡罗卜素："+item.getLb());
        TextView tv_food_jia = helper.getView(R.id.tv_food_jia);
        tv_food_jia.setText("钾："+item.getJia());
        TextView tv_food_lin = helper.getView(R.id.tv_food_lin);
        tv_food_lin.setText("磷："+item.getLing());
        TextView tv_food_shgdl = helper.getView(R.id.tv_food_shgdl);
        tv_food_shgdl.setText("视黄醇当量："+item.getShc());
        TextView tv_food_na = helper.getView(R.id.tv_food_na);
        tv_food_na.setText("钠："+item.getLa());
    }


}
